// pages/order/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabs: [
      {
        id: 0,
        name: "全部",
        isActive: true
      },
      {
        id: 1,
        name: "代付款",
        isActive: false
      },
      {
        id: 2,
        name: "带发货",
        isActive: false
      },
      {
        id: 2,
        name: "退货/换货",
        isActive: false
      }
    ]
  },
  handletabtap(e) {
    let { tabs } = this.data
    tabs.forEach((v, i) => {
      i === e.detail.index ? v.isActive = true : v.isActive = false
    })
    this.setData({
      tabs
    })
  },
  onShow: function () {
    let params = {}
    wx.getUserInfo({
      success: (res) => {
        const { encryptedData, rawData, iv, signature, code } = res
        params = { encryptedData, rawData, iv, signature, code }
        wx.setStorageSync("params", params);
      }
    })
  },

})